package zy4;

import java.util.Scanner;

/**
 * 披萨工厂类
 */
public class Pizzaplant {
    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);

        System.out.println("请选择想要制作的披萨(1.培根披萨 2.海鲜披萨)");
        int num = sca.nextInt();
        if (num == 1){
            System.out.println("请输入培根克数:");
            int kg = sca.nextInt();
            System.out.println("请输入披萨大小:");
            int size = sca.nextInt();
            System.out.println("请输入披萨价格:");
            int price = sca.nextInt();
            Pizza pizza1 = new Seafood("培根披萨",price,size,kg);
            pizza1.show();
        }
        if (num == 2){
            System.out.println("请输入配料信息:");
            String burdening = sca.next();
            System.out.println("请输入披萨大小:");
            int size = sca.nextInt();
            System.out.println("请输入披萨价格:");
            int price = sca.nextInt();
            Pizza pizza2 = new Bacon("海鲜披萨",price,size,burdening);
            pizza2.show();
        }
    }
}
